package com.common.converter;

import com.common.entity.casemanage.CaseEntity;
import com.common.entity.casemanage.CaseRiskEntity;
import com.common.excel.excelinfo.CaseExcelInfo;
import com.common.vo.casemanage.CaseForRiskVo;
import com.common.vo.casemanage.CaseVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

/**
 * @author johnny
 * @create 2020-07-13 下午5:04
 **/
@Mapper
public interface CaseRiskConverter {

    CaseRiskConverter INSTANCE = Mappers.getMapper(CaseRiskConverter.class);


    @Mappings({
            @Mapping(source = "createTime", target = "createTime", dateFormat = "yyyy-MM-dd HH:mm:ss"),
            @Mapping(source = "updateTime", target = "updateTime", dateFormat = "yyyy-MM-dd HH:mm:ss"),
    })
    CaseForRiskVo domain2vo(CaseRiskEntity caseEntity);


    @Mappings({
            @Mapping(source = "createTime", target = "createTime", dateFormat = "yyyy-MM-dd HH:mm:ss"),
            @Mapping(source = "updateTime", target = "updateTime", dateFormat = "yyyy-MM-dd HH:mm:ss"),
    })
    CaseRiskEntity vo2domain(CaseForRiskVo caseForRiskVo);
}